﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;

namespace Blizzard.Mapper
{
   public interface IMapper
    {
        /// <summary>
        /// Gets the name of the table mapped to this type
        /// </summary>
        /// <param name="type">type mapped to a table</param>
        /// <returns>table name</returns>
        string GetTableName(Type type);
        string GetIdentityFieldName(Type type);
        bool IsIdentityColumn(PropertyInfo pi);
        string GetFieldName(PropertyInfo pi);
        bool IsPartOfComposition(PropertyInfo pi);
        string GetJoinTableName(PropertyInfo pi);

       /// <summary>
       /// In a many to many relationship, it gets the corresponding id field in the Join Table
       /// </summary>
       /// <param name="pi">The list property of the object who's id field in join table will be retrieved</param>
       /// <returns></returns>
        string GetMyIdFieldName(PropertyInfo pi);

    }
}
